<template>
    <p>这是一个父组件</p>
    <p>{{ msg }}</p>
    <ChildCom :parentMsg="msg" @test="getChildMsg" />
</template>


<script>
import ChildCom from './ChildCom.vue'
export default {
    name:"ParentCom",
    components:{
        ChildCom
    },  
    data() {
        return {
            msg: "父组件1231313"
        }
    },
    methods:{
        getChildMsg(info){
            console.log('info', info);
            this.msg = info
        }
    }
}
</script>